{extend name="index_layout"/}
{block name="main"}
<!--    <div class="layui-body">-->
<div class="layui-container">
    <div class="layui-card">
        <div class="layui-card-header">基本信息</div>
        <div class="layui-card-body">
            <p><strong>用户ID：</strong> {$data.user.id}</p>
            <p><strong>用户昵称：</strong> {$data.user.nickName}</p>
            <p><strong>昨日播放次数：</strong> {$data.yesterday_video}</p>
            <p><strong>当日播放次数：</strong> {$data.day_video}</p>
            <p><strong>总播放次数：</strong> {$data.video_num}</p>

        </div>
    </div>


    <div class="layui-card">
        <div class="layui-card-header">钓点详情</div>
        <table class="layui-table">
            <thead>
            <tr>
                <th>ID</th>
                <th>钓点</th>
                <th>地址</th>
                <th>创建时间</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>{$data.id}</td>
                <td>{$data.loc_name}</td>
                <td>{$data.address}</td>
                <td>{$data.create_time}</td>
            </tr>
            <!-- 其他商品信息 -->
            </tbody>
        </table>
    </div>


</div>

<div class="layui-card">
    <div class="layui-card-header">播放详情</div>
    <div class="layui-card-body">
        <table class="layui-hide" id="currentTable" lay-filter="currentTable"></table>
    </div>
</div>
<!--    </div>-->

<script src="https://cdn.jsdelivr.net/npm/layui-src/dist/layui.all.js"></script>
<script>
    layui.use(['element'], function () {
        var element = layui.element;
    });
</script>





{/block}
{block name="script"}

<script type="text/javascript">
    layui.use('yznTable', function () {
        var table = layui.yznTable;
        var init = {
            table_elem: '#currentTable',
            table_render_id: 'currentTable',
            edit_url: '{:url("edit")}',
            delete_url: '{:url("del")}',
            modify_url: '{:url("multi")}',

        };

        table.render({
            init: init,
            toolbar: ['refresh'],
            url: '{:url("edit")}' + '?id=' + {$data.id},
            cols: yznTable.formatCols([
                [
                    {field: 'id', width: 80, title: 'ID'},
                    {field: 'video_user.nickName', title: '播放者'},
                    {field: 'loc_name', title: '钓点'},
                    {field: 'money', title: '收益'},
                    {field: 'create_time', minWidth: 80, title: '播放时间', search: 'range'},

                ]
            ], init),
            page: {}
        });
        yznTable.listenSwitch({filter: 'status', url: init.modify_url});

        yznTable.bindevent();
    });
</script>


<script type="text/javascript">
    layui.use('yznForm', function () {
        var yznForm = layui.yznForm;
        yznForm.bindevent($("form.layui-form"));
    });
</script>
{/block}